Fix prelighting of inconsistent radio and check buttons
authorMatthias Clasen <mclasen@redhat.com>
Wed, 17 Nov 2010 06:04:14 +0000 (01:04 -0500)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:15 +0000 (15:39 +0100)
gtk/gtkcheckbutton.c
gtk/gtkradiobutton.c

index f07ecf1282eeb78d9f3fa4a2ba3250a230d53b97..ac565f436771731da89e98be577a039eb2016223 100644 (file)
@@ -465,7 +465,7 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
     x = allocation.width - (indicator_size + x);
 
-  if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
+  if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT)
     {
 
       gtk_paint_flat_box (style, cr, GTK_STATE_PRELIGHT,
index 33479503ab52c0310c268cb0c2aa8cb20b496200..6a5e2095d984d6ffd6262b44d316cb334236baa0 100644 (file)
@@ -947,7 +947,7 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
     x = allocation.width - (indicator_size + x);
 
-  if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
+  if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT)
     {
       gtk_paint_flat_box (style, cr,
                           GTK_STATE_PRELIGHT,